describe("MoveToListController controller", function(){

    var controller = null;
    var objE = {errorCode:'code', errorMessage:'message'};

    beforeEach(function(){

        var t_alertCtrl = App.AlertController.create();
        var t_loadingCtrl = App.LoadingController.create();
        var t_moveHolderCtrl = App.MoveHolderController.create();
        App.MoveToListController.reopen({

            init:function(){
                this.set('controllers', Em.Object.create({
                    alert: t_alertCtrl,
                    loading: t_loadingCtrl,
                    moveHolder: t_moveHolderCtrl
                }));
            }
        });
        controller = App.MoveToListController.create();
    });

    it("selectListItem", function(){

        spyOn(controller,'setDestinationAccount');
        spyOn(controller, 'transitionTo');
        var account = App.BaseAccount.create();

        controller.selectListItem(account);

        expect(controller.setDestinationAccount).toHaveBeenCalledWith(account);
        expect(controller.transitionTo).toHaveBeenCalledWith('move.fromList');
    });

});